#pragma once
class CWarningMgr
{
    HWND m_hExe;
    UINT m_msg;
    struct sFlag
    {
        DWORD dwLast;
        DWORD dwTime;
    };
    sFlag AryData[20];

public:
    CWarningMgr():m_msg(E_MSG_WARN)
    {
#define SET_DATA(I, D) AryData[(I)].dwTime = (D), AryData[(I)].dwLast = 0
        SET_DATA(E_WHISPER, 0);
        SET_DATA(E_BAGFULL, 60000*5);
        SET_DATA(E_BYPK, 60000);
        SET_DATA(E_OFFLINE, 60000);
        SET_DATA(E_DEAD, 60000*2);
        SET_DATA(E_BOTNONE, 60000);
        SET_DATA(E_BLOCK, 60000);
#undef SET_DATA
    }
    ~CWarningMgr(){}
    static CWarningMgr& Instance()
    {
        static CWarningMgr T;
        return T;
    }
    void Init(HWND hWnd)
    {
        m_hExe = hWnd;
    }
    void Report(DWORD dwType);
};